home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / PacMan / PlayerUpView.h < prev    next >
Encoding:
Text File  |  1992-06-27  |  723 b   |  28 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. // Shows how many pacs are left in the game... a very simple view
  5. // subclass that just draws 0-6 Pacs on the screen.
  6.  
  7. #import <appkit/View.h>
  8.  
  9. #define PAC_SIZE 16        // pixels square
  10.  
  11.  
  12. @interface PlayerUpView:View
  13. {
  14.     id pacs;    // NXImage of the various Pac shapes
  15.     
  16.     int numUp;    // How many pacs the player has left
  17. }
  18.  
  19. - initFrame:(const NXRect *)frm;    // initialize instance
  20. - drawSelf:(NXRect *)rects :(int)rectCount;  // standard rendering method
  21. - setNumUp:(int)num;                // set number of pacs left
  22. - incPacs;        // add another pac to the bunch
  23. - (int)pacs;    // return # pacs left
  24. - (BOOL)nextPac;    // if pacs left, decrement # pacs and return YES.
  25.                 // returns NO if no pacs left.
  26.  
  27. @end
  28.